#ifndef _INPUT_MANAGER_H
#define _INPUT_MANAGER_H

#include <sys/time.h>

#ifndef NULL
#define NULL (void *)0
#endif


#define INPUT_TYPE_TOUCH 0
#define INPUT_TYPE_NET 1


// 输入事件结构体
typedef struct InputEvent
{   
    struct timeval tTime;
    int iType;
    int iX;
    int iY;
    int iPressure;
    char str[1024];

}InputEvent, *PInputEvent;


// 输入设备结构体
typedef struct InputDevice
{   
    char *name;
    int (*InputDeviceInit)(void); // 输入设备初始化
    int (*GetInputEvent)(PInputEvent ptInputEvent); // 从输入事件中获取数据
    int (*InputDeviceExit)(void); // 退出设备
    struct InputDevice *ptNext;

}InputDevice, *PInputDevice;




int RegisterInputDevice(InputDevice *ptInputDevice);
int RegisterAllInputDevs(void);
int InputDevsInit(void);
int GetInputEvent(PInputEvent ptInputEvent);




#endif